package com.xdog.okx.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.xdog.okx.service.IOkxTokenService;
import com.xdog.okx.utils.OkxApiUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * OKX代币数据服务实现类
 * 提供代币相关信息查询功能
 */
@Slf4j
@Service
public class OkxTokenServiceImpl implements IOkxTokenService {

    @Override
    public JSONObject getTokenList(Map<String, String> params) {
        String requestPath = "/api/v5/xlayer/token/token-list";
        return OkxApiUtil.get(requestPath, params);
    }

    @Override
    public JSONObject getPositionList(Map<String, String> params) {
        String requestPath = "/api/v5/xlayer/token/position-list";
        return OkxApiUtil.get(requestPath, params);
    }

    @Override
    public JSONObject getTransactionList(Map<String, String> params) {
        String requestPath = "/api/v5/xlayer/token/transaction-list";
        return OkxApiUtil.get(requestPath, params);
    }
}